package com.kaifamiao.regular;

import java.util.Scanner;

public class CheckMobile {

    public static void main(String[] args) {
        final Scanner s = new Scanner( System.in );

        final String regex = "^1(3\\d|47|5\\d|66|7\\d|8\\d|98|99)\\d{8}$";

        String email ;
        do{
            System.out.println( "请输入中国大陆地区的手机号码" );
            email = s.nextLine();
        } while ( !email.matches( regex ) );

        System.out.println( "你输入的手机号码是: " + email );

        s.close();
    }

}
